Browser program for performing table-layout

ABSTRACT

There is provided a method of laying out contents targeted for a first device having a first screen size on a screen of a second device having a second screen size smaller than the first screen size. The method includes analyzing a table width of the table in accordance with a predetermined criterion; and performing in response to a result of the analyzing step one of layout operations of: (p1) laying out the table using a typical technique in accordance with the second screen size, and (p2) laying out a row of cells in the table so that at least two cells arranged adjacently in a horizontal direction in the row of the table are aligned horizontally on the screen of the second device based on a predetermined algorithm.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a 35 U.S.C. §371 filing of International PatentApplication No. PCT/JP2004/001606, filed Feb. 13, 2004, titled BROWSERPROGRAM FOR PERFORMING TABLE-LAYOUT, which claims the benefit ofJapanese Application No. 2003-036279, titled BROWSER PROGRAM FORPERFORMiNG TABLE-LAYOUT, filed Feb. 14, 2003, which is incorporatedherein by reference in its entirety.

FIELD OF THE INVENTION

The present invention relates to a browser used for browsing contents onthe Internet, and particularly to a layout method of laying out a tablein the contents.

BACKGROUND OF THE INVENTION

Recently, with the widespread use of the Internet as a background, userdemands for browsing contents described by a markup language such as anHTML (hypertext markup language) on a portable device such as a mobilephone and a PDA (personal digital assistant) are now increasing.

Typically, the contents on the Internet are targeted for a personalcomputer having a relatively large screen which is larger than a screensize of the portable device. That is, the contents targeted for thepersonal computer include images and tables whose sizes are larger thanthe screen size of the portable device. For this reason, in many cases,the portable device having a relatively small screen can not suitablydisplay the contents of the Internet on the screen thereof.

The table, which is defined in the contents by a tag <table>, is used tolay out cells of the table in a form of a two-dimensional array on adevice. In addition, by utilizing the table, a relatively large imagecan be displayed on the screen of a device as a combinational imageconsisting of a plurality of cells of partial images.

A method of browsing contents targeted for the personal computer usingthe portable device having relatively small screen has been proposed.This method includes aligning cells, which are aligned horizontally(i.e., in a direction of a row) in a table of the contents, verticallyon the screen of the portable device. By adopting the method, thebrowser running on the portable device enables a user to browse thecells on the relatively small screen of the portable device by scrollingvertically the cells by operating, for example, an up-and-down key.

However, if the cells, which are aligned horizontally in originalcontents, are aligned on the screen of the portable device vertically,the significance of alignment of the cells which are aligned in theoriginal contents in a form of a two-dimensional array may be lost.

Japanese Patent Provisional Publications No. HEI 9-9160 (document 1) andNo. 2001-243151 (document 2) disclose a technique to scale down an imagein original contents in accordance with the screen size of the portabledevice. By adopting the technique disclosed in the documents 1 and 2,the browser running on the portable device can display the image of theoriginal contents within the screen of the portable device. However, inthe documents 1 and 2, no explanation is made on how to display a tableon the relatively small screen of the portable device without losing thesignificance that the two-dimensional array of the table has.

Another factor that inhibits comfortable browsing of the contentstargeted for the personal computer on the portable device is a“frameset” which is defined in the contents by a set of tags <frameset>and </frameset>. The tag <frameset> is a declaration statement used todivide the screen into a plurality of frames to display differentcontents on the respective frames. In the frameset, contents having aURL (uniform resource locator) designated by a tag <frame src=“ . . . ”>are displayed in one frame.

Similarly to the table defined by the tag <table>, by using theframeset, contents can be displayed on a screen of a device in a form ofa two-dimensional array. However, in a case where the contents includingthe frameset are displayed by the browser on the relatively small screenof the portable device, one of URL contents designated by the tag <framesrc=“ . . . ”> is displayed in a small section (i.e., one frame) of therelatively small screen of the portable device. In this case, the URLcontent may be difficult to be read. That is because the browser runningon the portable device simply divides the screen into a plurality offrames and arranges the frames in a form of a two-dimensional array inaccordance with tags <frame cols=“,”> and <frame rows=“,”> described inthe frameset.

That is, a screen size per a frame becomes very small when the framesetis displayed by the browser on the relatively small screen of theportable device.

Japanese Patent Provisional Publication No. 2000-298543 (document 3)discloses a method to indicate an active frame of a plurality of framesby a heavy line, and to use a frame switching key to switch between theframes when the frameset is displayed by a browser on a computer.

By adopting the technique disclosed in the document 3, the browserenables the user to recognize the active frame visually and to switch toa desired frame relatively easily by using the frame switching key.However, in the document 3, no explanation is made on how to display theframeset on the relatively small screen of the portable device withoutlosing the significance that the two-dimensional array of the frames ofthe frameset has.

SUMMARY OF THE INVENTION

The present invention is advantageous in that it provides a method oflaying out contents of the Internet on a relatively small screen of aportable device without losing a significance that a linear array or atwo-dimensional array of data included in the contents such as a table,a frameset and the like has.

According to an aspect of the invention, there is provided a method oflaying out contents targeted for a first device having a first screensize on a screen of a second device having a second screen size smallerthan the first screen size. The method includes: analyzing a tabledefined by a tag <table> in the contents to determine a table width ofthe table in accordance with a predetermined criterion; and performingin response to a result of the analyzing step one of layout operationsof:

-   (p1) laying out the table using a typical technique in accordance    with the second screen size, and-   (p2) laying out a row of cells in the table so that at least two    cells arranged adjacently in a horizontal direction in the row of    the table are aligned horizontally on the screen of the second    device based on a predetermined algorithm.

With this configuration, even if the contents targeted for the firstdevice (e.g., a personal computer) include a table, the table can bedisplayed on the second device (e.g., a portable device) without losingsignificance that the linear array or the two-dimensional array of theinformation has.

Optionally, the layout operations may include (p3) scaling down thetable configured to be a combinational image having a plurality ofpartial images so that the combinational image can be contained in thescreen of the second device at least in a horizontal direction.

Still optionally, the predetermined criterion may include a firstcriterion that whether or not a condition:(a minimum table width)>(a width of the screen of the second device)is satisfied, the minimum table width of the table being a width of arow in the table when cells of the row of the table is minimized. Inthis case, when the first criterion is not satisfied, the operation of(p1) is performed. Further, when the first criterion is satisfied, oneof the operations of (p2) and (p3) is performed.

Still optionally, the predetermined criterion may include a secondcriterion that a number of carriage returns of characters in at leastone of cells of a row of the table is greater than a certain value whenthe cells of the row of the table are minimized. In this case, when thesecond criterion is satisfied, one of the operations of (p2) and (p3) isperformed even if the first criterion is not satisfied.

Still optionally, the predetermined criterion may include a thirdcriterion that a ratio of a vertical size to a horizontal size of atleast one of cells of a row of the table is grater than a certain ratiowhen the cells of the row of the table are minimized. In this case, whenthe third criterion is satisfied, one of the processes of (p2) and (p3)is selected even if the first criterion is not satisfied.

Still optionally, the predetermined criterion may include a fourthcriterion that a width of at least one of cells having characters in arow of the table is less than or equal to a certain value when the cellsof the row of the table are minimized. In this case, when the forthcriterion is satisfied, one of the operations of (p2) and (p3) isperformed even if the first criterion is not satisfied.

In a particular case, the method may includes determining whether thetable is configured to be the combinational image. In this case, theoperation (p3) is performed when the table is determined to be thecombinational image by the determining step.

Optionally, in the determining step, when a ratio of a number of cellshaving images to a number of all cells of the table is greater than acertain ratio, the table may determined to be the combinational image.

In a particular case, the predetermined algorithm may include operationsof:

(a1) aligning the at least two cells arranged adjacently in thehorizontal direction in the row of the table on a row of the screen ofthe second device,

(a2) aligning remaining cells of the at least two cells, that can not bealigned on the row of the screen of the second device, on another row ofthe screen of the second device, and

(a3) performing the operations of (a1) and (a2) with respect to all rowsof the table.

In a particular case, the minimum table width may be a sum of widths ofimages in cells of the row of the table, a maximum of widths ofcharacters in each cell of the row of the table, and widths of bordersbetween adjacent cells of the row of the table.

In a particular case, the operation (p3) may include: (b1) scaling downcells of the table by the same scaling factor in accordance with thesecond screen size, and (b2) scaling down each of partial images of thecells of the table in accordance with a width of a corresponding scaleddown cell.

Optionally, the method may include converting in advance a frameset to atable in accordance with a predetermined conversion algorithm if theframeset exists in the contents.

Still optionally, the method may include obtaining in advance thecontents through a network.

Still optionally, the method may include obtaining in advance thecontents through the Internet.

Still optionally, the contents may include a document described by amarkup language.

According to another aspect of the invention, there is provided acomputer program product providing a set of instructions executed by aterminal device, the terminal device executing the instructionsfunctioning as laying out contents targeted for a device having a firstscreen size on a screen of the terminal device having a second screensize smaller than the first screen size. The computer program productincludes functions of:

obtaining the contents through a network;

analyzing a table defined by a tag <table> in the contents to determineda table width of the table in accordance with a predetermined criterion;and

performing, in response to a result of the analyzing, one of layoutoperations of:

-   (p1) laying out the table using a typical technique in accordance    with the second screen size, and-   (p2) laying out a row of cells in the table so that at least two    cells arranged adjacently in a horizontal direction in the row of    the table are aligned horizontally on the screen of the terminal    device based on a predetermined algorithm.

With this configuration, even if the contents targeted for the device(e.g., a personal computer) include a table, the table can be displayedon the terminal device (e.g., a portable device) without losingsignificance that the linear array or the two-dimensional array of thetable has.

According to another aspect of the invention, there is provided aterminal device for laying out contents targeted for a device having afirst screen size on a screen of the terminal device having a secondscreen size smaller than the first screen size. The terminal deviceincludes an analyzing system that analyzes a table defined by a tag<table> in the contents to determined a table width of the table inaccordance with a predetermined criterion, and a layout system thatperforms in response to a result of an analysis of the analyzing systemone of layout operations of:

-   (p1) laying out the table using a typical technique in accordance    with the second screen size,-   (p2) laying out a row of cells in the table so that at least two    cells arranged adjacently in a horizontal direction in the row of    the table are aligned horizontally on the screen of the terminal    device based on a predetermined algorithm, and-   (p3) scaling down the table configured to be a combinational image    having a plurality of partial images so that the combinational image    can be contained in the screen of the terminal device at least in a    horizontal direction.

With this configuration, even if the contents targeted for the device(e.g., a personal computer) include a table, the table can be displayedon the terminal device (e.g., a portable device) without losingsignificance that the linear array or the two-dimensional array of theinformation has.

Optionally, the terminal device may include an obtaining system thatobtains the contents through a network.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will be understood and appreciated from thefollowing detailed description, taken in conjunction with the drawingsin which:

FIG. 1 shows a block diagram of a potable device according to a firstembodiment of the invention;

FIG. 2 shows a functional block diagram of a browser that runs under acontrol of a CPU of the portable device;

FIG. 3 is a flowchart showing a table-layout process;

FIG. 4 is an example of a HTML document including a table;

FIG. 5 shows a screen image when the HTML document shown in FIG. 4 isdisplayed on a screen of a personal computer;

FIG. 6A shows an example of a structure of a table;

FIG. 6B shows an example of a screen image when cells of a top row ofthe table shown in FIG. 6A are aligned by the table-layout process;

FIG. 6C shows another example of a screen image when cells of a top rowof the table shown in FIG. 6A are aligned by the table-layout process;

FIG. 6D shows another example of a screen image when cells of a top rowof the table shown in FIG. 6A are aligned by the table-layout process;

FIG. 7 is an example of a screen image as a result of a splittingprocess in which the HTML document shown in FIG. 4 is treated;

FIG. 8 shows a comparative example of the screen image of the HTMLdocument of FIG. 4 treated by another process for comparing with theexample of FIG. 7;

FIG. 9 shows another comparative example of the screen image of the HTMLdocument of FIG. 4 treated by another process for comparing with theexample of FIG. 7;

FIG. 10A schematically shows an example of a row of a table to beprocessed;

FIG. 10B shows a screen image in a case where a target row shown in FIG.10A is subjected to an algorithm (d1)-(d5);

FIG. 10C shows a screen image in a case where a target row shown in FIG.10A is subjected to an algorithm (a1)-(a4);

FIG. 11 is an example of contents including a table as a combinationalimage;

FIG. 12 is a screen image of the contents shown in FIG. 10 in a casewhere the contents are displayed on a screen of a personal computer;

FIG. 13 is a screen image of the contents shown in FIG. 11 in a casewhere the contents are subjected to the table-layout process and aredisplayed on the screen of the portable device;

FIG. 14 is a comparative example of a screen image when cells of thecontents of FIG. 11 are subjected to a process in which all of the cellsare aligned vertically on the screen of the portable device 10 withoutexception;

FIG. 15 is an example of a screen image in a case where contentstargeted for the personal computer are displayed on a screen of thepersonal computer; and

FIG. 16 shows a screen image in a case where a frameset shown in FIG. 15is converted to a table by a conversion algorithm and is displayed onthe screen of the portable device.

DETAILED DESCRIPTION OF THE EMBODIMENT

Hereinafter, embodiments of the invention will be described withreference to the accompanying drawings.

First Embodiment

FIG. 1 shows a block diagram of a portable device 10 according to afirst embodiment of the invention. The portable device 10 has a display13 whose screen size is smaller than that of a personal computer. Forexample, if the personal computer is defined as a device having ahorizontal screen size of 800 pixels, the portable device 10 may be, forexample, a mobile phone having a horizontal screen size of 100 through200 pixels, a PDA having a horizontal screen size of 150 through 640pixels, or a car navigation device having a horizontal screen sizesmaller than 640 pixels. In the first embodiment, the portable device 10is regarded as a mobile phone having a horizontal screen size of 200pixels by way of example.

As shown in FIG. 1, the portable device 10 includes a CPU (CentralProcessing Unit) 3 which controls various operation of the portabledevice. Further, the portable device 10 includes a ROM (Read-OnlyMemory) 5, a RAM (Random-Access Memory) 7, a network interface 9, adisplay driver 11 and an interface 15 which are connected to the CPU 3via a bus 19. Further, the portable device 10 has a display 13 which hasthe horizontal screen size of 200 pixels and which is connected to thedisplay driver 11, and has a user interface device 17 such as anoperation panel including an up-and-down key and numeric keys. The userinterface device 17 is also connected to the CPU 3 via the interface 15.

The ROM 5 stores various programs including a program of a browser 20which is initiated when a certain key operation is made by a userthrough the use of the user interface device 17.

FIG. 2 shows a functional block diagram of the browser 20 that runsunder the control of the CPU 3. As shown in FIG. 2, the browser 20 hasfunctional blocks of parser 31, a page maker 32 and a formatter 33.

The parser 31 parses an HTML document 21 (i.e., contents) that isobtained from the Internet via the network interface 9 so as to make adocument tree 23 in which a grammatical structure of the HTML document21 is expressed by a tree structure. It should be noted that thedocument tree 23 only expresses the grammatical structure of the HTMLdocument 23, and does not include information of presentation of theHTML document 23.

Next, based on the document tree 23 and information about tags, the pagemaker 32 makes a layout tree 25 in which forms of presentation of theHTML document 21, for example, block, inline, table, list, item and thelike are included. That is, the layout tree 25 includes informationabout the order of the data such as block, inline, table and the like inthe HTML document 21. It should be noted that the layout tree 25 doesnot include information about positions and sizes of such items (block,inline, table, etc.) on the screen of the display 13.

Based on the layout tree 25 and information concerning the screen sizeof the display 13, the formatter 33 lays out the items on the screen ofthe display 13. That is, the formatter 33 arranges the items in thelayout tree 25 on the screen of the display 13, and determinespositions, widths and heights of the items and positions of carriagereturns in characters of items.

Through such processes performed by the parser 31, the page maker 32 andthe formatter 33, the HTML document 21 is displayed on the screen of thedisplay 13.

Further, the formatter 30 of the browser 20 is configured to carry out atable-layout process when contents targeted for the personal computerincludes a table. That is, the table-layout process enables to lay outand to display contents targeted for the personal computer on the screenof the portable device 10 without losing significance that atwo-dimensional array or a linear array of the table has.

FIG. 3 is a flowchart showing the table-layout process. The table-layoutprocess is summarized as follows.

-   (1) If a table in the contents can be contained in the screen of the    portable device 10, the table is laid out in a typical technique and    is displayed on the screen of the portable device 10 (step S12).-   (2) When the table can not be contained in the screen of the    portable device 10:

if the table is a combinational image having partial images, a scalingdown layout process (step S20) is performed to scaled down the table inaccordance with the screen size of the portable device 10;

if the table is not the combinational image having partial images, asplitting process (step S21) is performed to split and display cells inthe table.

The typical technique means a conventional technique to lay out thetable in accordance with a size of an area to be used for displaying thetable without changing an array of cells in the table. As described indetail later, in this embodiment, such typical technique is used onlywhen the entire table can be contained in the screen of the portabledevice 10.

Hereafter, the table-layout process will be explained in detail withreference to FIG. 3 through FIG. 14. As shown in FIG. 3, initially, instep S11, a table in the contents is analyzed to calculate a minimumtable width. The minimum table width is a minimum number of pixels inthe horizontal direction required to display data included in cells ofone of the rows of the table. With regard to a row of the table, theminimum table width is defined as the sum of widths of images in cellsof the row, a maximum of widths of characters in each cell of the row(i.e., a sum of maximum character widths of all cells of the row), andwidths of borders between adjacent cells of the row.

After the minimum table width is calculated, it is determined whetherthe minimum table width is greater the screen size of 200 pixels (stepS11).

Given that a HTML document 40 obtained by the portable device 10 is oneshown in FIG. 4. The HTML document 40 is targeted for the personalcomputer. As shown in FIG. 4, the HTML document 40 includes a table inwhich each cell is expressed by a mixture of image data and characterdata.

FIG. 5 shows a screen image when the HTML document 40 shown in FIG. 4 isdisplayed on a screen of the personal computer by a conventionalbrowser. Since the personal computer has a sufficient screen size, threecells CE1, CE2 and CE3, each of which has images and characters, aresuitably aligned and displayed horizontally on the screen of thepersonal computer.

With regard to the HTML document 40, the minimum table width iscalculated as follows:(minimum table width)={(a width of an image)+(a maximum of widths ofcharacters)}×(the number of cells)+αwhere α represents widths of borders between adjacent cells. Assumingthat the width of an image aaa_b.gif is 105 pixels, the minimum tablewidth is larger than 315 (105×3) pixels which is greater than the screensize (200 pixels) of the portable device 10. In this case, it isdetermined that the minimum table width is larger than the screen sizein step S11, and thereafter the table is treated in the splittingprocess (S21) or the scaling down layout process (S20).

If the minimum table width is smaller than or equal to the screen sizeof the portable device 10(S11:NO), the table is displayed on the screenof the portable using the typical technique because the table can becontained within the screen size of 200 pixels of the portable device 10(S12).

A series of steps S13-S19 is a process for determining whether or notthe table is a combinational image consisting of a plurality of cells ofpartial images. By the series of process S13-S19, when the ratio of thenumber of cells having images to the number of all cells in the table isgreater then a predetermined ratio, the table is determined to be thecombinational image (S19:YES), and thereafter the table is subjected tothe scaling down layout process (S20). When the ratio of the number ofcells having images to the number of all cells of the table is notgreater than the predetermined ratio, the table is subjected to thesplitting process (S21:YES).

In step S13, parameters of a cell required by steps S14, S15 and S16 areobtained. Next, in step S14, it is determined whether or not the cellincludes characters. If the cell includes characters (S14:YES), the cellcan be regarded as one that does not constitute the combinational image.Then, control proceeds to step S18 to treat a next cell of the table.

If it is determined that the cell does not include characters (S14:NO),control proceeds to step S15 to determine whether or not the cellincludes a further table. If the cell includes the further table(S15:YES), the cell can be regarded as one that does not constitute thecombinational image. Therefore, in this case, control proceeds to stepS18 to treats a next cell.

If it is determined that the cell does not include the further table(S15:NO), control proceeds to S16 to determine whether or not the cellincludes an image having a size larger than a predetermined size (forexample, a horizontal size of 10 pixels). If the table does not includean image whose size is larger than the predetermined size (S16:NO),control proceeds to step S18 to treats a next cell. If the tableincludes an image whose size is larger than or equal to thepredetermined size, a variable N is increased by one so as to count upthe number of cells having images (S17).

In order not to count a cell having an image such as a spacer only usedfor enhancing the appearance of the table as one of partial images ofthe combinational image, the variable N is not counted up when a size ofthe image in the cell is smaller than the predetermined size.

In step S18, it is determined whether an untreated cell remains or not.When the untreated cell remains (S18:YES), control returns to S13 totreat the untreated cell. When all of the cells in the table aresubjected to the series of processes S13-S17 (S18:NO), control proceedsto step S19 to determine whether the ratio of the number of cells ofimages to the number of all cells of the table (i.e., the ratio of N toall cells of the table) is greater than or equal to 2/3.

When the ratio is greater than or equal to 2/3 (S19:YES), the table isregarded as the combinational image having the partial images and issubjected to the scaling down layout process (S20) in which the table,i.e., a relatively large image as the combinational image, is scaleddown to display on the screen of the portable device. When the ratio issmaller than 2/3 (S19:NO), the table is not regarded as thecombinational image and is subjected to the splitting process (S21) inwhich the table is split by a cell and is displayed on the screen of theportable device 10.

It should be noted that, although in this embodiment the value 2/3 isused as the predetermined ratio to determine whether the table is thecombinational image or not, another value may be used as thepredetermined ratio.

As described above, in the table-layout process of FIG. 3, if thefollowing three conditions are satisfied, a cell is regarded as apartial image that constitutes the combinational image.

-   (1) The cell does not include characters.-   (2) The cell does not include a table.-   (3) An image in the cell is larger than or equal to the    predetermined size.

Next, the splitting process (S21) is described in detail. The table issplit by a cell in the splitting process S21 in accordance with thefollowing algorithm.

-   (a1) One of a row of the table (for example, the top row) is    selected as a target row.-   (a2) Cells of the target row capable of being aligned within the    screen width of the display 13 are aligned horizontally on the    screen of the display 13. That is, cells of the target row capable    of being contained in the screen width of 200 pixels are    horizontally aligned on the screen of the portable device 10.

(a3) Remaining cells that can not be aligned in a horizontal directionon the screen of the portable device 10 are subjected to the above rule(a2) to align the remaining cells in a different row (for example, anext row) on the screen of the portable device 10.

-   (a4) After the processes of (a2) and (a3) are finished with regard    to the target row of the table, another row of the table is    subjected to the processes of (a1) through (a3).

In the above processes of (a1) through (a4), the table is displayed onthe screen with each cell reflecting its data of modifiers such as aborder and a background color.

If a target table 60 is one which has a structure shown in FIG. 6A, thetarget table 60, which is an array of 3×3 cells having the same size, istreated as follows. Given that only two cells of the target table 60 canbe aligned horizontally in the screen width of 200 pixels.

When a top row of the target table 60 is subjected to the splittingprocess (S21), cells of the top row are displayed as indicated in FIG.6B. As shown in FIG. 6B, by the splitting process S21, a remaining cell(a box numbered 3 in FIG. 6B) is displayed at a central position of anext row on the screen of the portable device. Although, in an exampleof FIG. 6B, the remaining cell 3 is located at the central position inthe next row, the remaining cell 3 may be positioned in the next row atanother position (for example, a right portion or a left portion of thescreen).

Although in this embodiment the splitting process S21 operates so thatthe top row of the target table 60 is displayed on the screen asindicated in FIG. 6B, the splitting process may be configured to displaythe top row of the table as indicated in FIG. 6C or FIG. 6D. In anexample of FIG. 6C, only the cell 1 is displayed on a top row of thescreen, and the cells 2 and 3 are aligned in a next row on the screen.In an example of FIG. 6D, the cells 1-3 are aligned vertically on thescreen. In each of the examples of FIGS. 6B-6D, each cell reflects itsdata of modifiers such as a border and a background color.

FIG. 7 is an example of a screen image as a result of the splittingprocess S21 in which the HTML document 40 shown in FIG. 4 is treated. Inthis example, since each cell has a relatively wide width, the threecells are aligned vertically on the screen with each cell reflecting itsdata of modifiers.

Each of FIGS. 8 and 9 shows a comparative example of a screen image ofthe HTML document 40 of FIG. 4 treated by another process for comparingwith the example of the result of the splitting process S21 according tothe embodiment. FIG. 8 is an example in which each cell is scaled downin a horizontal direction so that all the three cells can be alignedhorizontally. Since, as can be seen from FIG. 8, the width of each cellis scaled down considerably, the number of carriage returns isconsiderably increased in comparison with the example of FIG. 7.Therefore, the screen image of FIG. 8 is difficult for the user to read.

FIG. 9 is an example in which all of the cells in a target row of thetable are aligned vertically on the screen without exception. The screenimage of the FIG. 9 is less suitable than the screen image of FIG. 4because the cells shown in FIG. 9 have lost representation by data ofmodifiers.

Since, according to an algorithm of FIG. 9, the cells are alignedvertically without exception even if two or more cells can be alignedhorizontally on the screen of the portable device, significance of atwo-dimensional array of the target table is lost.

Hereafter, a variation of the above mentioned splitting process (S21)will be described. In the above mentioned splitting process (S21), cellsof the target row capable of being aligned within the screen width ofthe display 13 are determined, and the remaining cells are aligned onthe next row. By contrast, in this variation, cells of the target rowcapable of being aligned within the screen width of the display 13 aredetermined as in the case of the splitting process of (a1) through (a4).Then, the remaining cells are also aligned to a current row on thedisplay 13 if the remaining cells satisfy a predetermined condition.

An algorithm of this variation is as follows.

-   (d1) One of a row of the table (for example, the top row) is    selected as a target row.-   (d2) With regard to the cells of the target row, cells that are    capable of being aligned within the screen width (e.g., 200 pixels)    of the display 13 are determined.-   (d3) After the cells capable of being aligned within the screen    width are determined, a sum of widths of the determined cells is    calculated. Then, it is determined whether the sum is smaller than a    certain width (e.g., 20 pixels) which is smaller than the screen    width (i.e., 200 pixels).    -   (d3-1) When it is determined that the sum (calculated in the        step (d3)) is smaller than the certain width (20 pixels), at        least one of remaining cells, which have been determined in the        step (d3) that they can not be aligned in the current row of the        display 13, is also targeted for aligning on the current row on        the display 13.    -   (d3-2) When it is determined that the sum (calculated in the        step (d3)) is not smaller than the certain width (20 pixels),        the remaining cells are aligned on a next row on the display 13        in accordance with the steps (d2) and (d3).-   (d4) After the step (d3-1) is finished, a sum of width of remaining    cells that can not be aligned on the current row of the display 13    is calculated. Then, it is determined whether the sum is smaller    than the certain width (20 pixels).-   (d5) When it is determined that the sum (calculated in the step    (d4)) is smaller than the certain width (20 pixels), at least one of    remaining cells, which have been determined at the step (d4) that    they can not be aligned in the current row of the display 13, is    also targeted for aligning on the current row of the display 13.    When it is determined that the sum (calculated in the step (d4)) is    not smaller than the certain width (20 pixels), the remaining cells    are aligned on the next row of the display 13.

It is understood that, since a sum of widths of the cells, which theabove algorithm finally determined that they can be aligned on thecurrent row of the display 13 by, is larger than the screen width of thedisplay 13, the cells are scaled down so as to contain the cells withinthe screen width of the display 13.

An example of a screen image as a result of the above mentionedalgorithm ((d1)-(d5)) will be shown with reference to FIGS. 10A-10C.FIG. 10A schematically shows an example of a row of a table to beprocessed. As show in FIG. 10A, the target row includes a cell E1 whichis smaller than the certain width (20 pixels), a cell E2 and a cell E3which is also smaller than the certain width (20 pixels).

As show in FIG. 10A, only the cell E1 can be contained within the screenwidth (200 pixels). However, by the steps (d3) and (d3-1), it isdetermined that the cell E2 is also aligned on the current row of thedisplay 13 because the cell E1 is smaller than the certain width (20pixels). Since a sum of widths of the cells E1 and E2 is larger than thecertain width, it is determined by the steps (d1) through (d3-1) thatonly the cells E1 and E2 are aligned on the current row of the display13.

However, according to the steps (d4) and (d5), the remaining cell E3 isalso targeted for aligning on the current row of the display 13. Sincethe cells E1, E2 and E3 are finally targeted for aligning on the currentrow of the display 13, the cells E1-E3 are scaled down so as to containthe cells within the screen width of the display 13.

FIG. 10B shows a screen image in a case where the target row shown inFIG. 10A is subjected to the algorithm (d1)-(d5) and is displayed on thedisplay 13. As a comparative example, a screen image in a case where thetarget row shown in FIG. 10A is subjected to the algorithm (a1)-(a4) andis displayed on the display 13 is shown in FIG. 10C. As shown in FIG.10C, according to the algorithm (a1)-(a4), the cells E1-E3 are split anddisplayed on the display 13 vertically.

In the above mentioned splitting process and the variation thereof, thetable is treated for each row, and, with regard to a target row, thedetermination step (e.g., (a2) and (d2)) is performed with respect toeach cell. In place of performing such a determination step with respectto each cell, the determination step can be performed with respect to acolumn in which a plurality of cells are aligned vertically.

For example, when a width of a certain column of the table is smallerthan a certain width (e.g., 20 pixels), it may be determined thatsplitting of cells is inhibited between the certain column and anadjacent column on the left side and between the certain column and anadjacent column on the right side. With this method, it becomesunnecessary to perform the determination step with respect to each cell.The value of the above mentioned certain width (i.e., 20 pixels) may bechanged in accordance with a width of a containing block designated inthe Web contents.

Next, the scaling down layout process S20 is described in detail. Thescaling down layout process S20 operates in accordance with thefollowing algorithm.

-   (b1) Columns of a target table are scaled down by the same scaling    factor in accordance with a size of a displaying area (e.g., the    screen width of 200 pixels in this embodiment) in which the target    table is to be displayed. That is, the width of each cell is    determined under a condition in which the table must be contained in    the displaying area.-   (b2) Since the width of the cell is determined, data in each cell is    laid out as follows.    -   (b2-1) If data of the cell is character data, characters in the        cell are folded (i.e., linefeed codes and/or carriage return        codes are inserted in the characters) so that the characters can        be displayed in the horizontal direction within the newly        determined cell width.    -   (b2-2) If data of the cell is image data, an image in the cell        is scaled down so that the image can be contained in the        horizontal direction of the newly determined cell width.    -   (b2-3) If data of the cell is data of another table (a second        table), the second table is subjected to the above processes of        (b1) and (b2). In this case, the newly determined cell width is        regarded as the size of the displaying area of the process (b1)        for the second table.-   (b3) A height of each cell can be determined by the above processes    up to (b2). A height of a certain row of the target table can be    determined as a maximum of all heights of cells included in the    certain row of the target table. Also, a height of the table is the    sum of the determined height of each row of the table.

FIG. 11 is an example of contents 70 including a table as acombinational image. FIG. 12 is a screen image of the contents 70 shownin FIG. 11 in a case where the contents 70 are displayed on a screen ofa personal computer by the conventional browser. As shown in FIG. 11,the contents 70 include the table having an array of 5×3 cells ofpartial images. For example, partial images 51,52,53,54 and 55 shown inFIG. 12 correspond to image data of a1. gif, a2. gif, a3. gif, a4. gifand a5. gif, respectively.

If the contents 70 shown in FIG. 11 are subjected to the table-layoutprocess of FIG. 3, the contents 70 are determined to be thecombinational image having partial images and are processed by thescaling down layout process S20.

FIG. 13 is a screen image of the contents 70 shown in FIG. 11 in a casewhere the contents 70 are subjected to the table-layout process of FIG.3 and are displayed on the screen of the portable device 10.

According to the table-layout process of FIG. 3 of this embodiment, ifthe table is configured as the combinational image, the combinationalimage is scaled down in accordance with the screen size of the portabledevice 10. Therefore, according to the table-layout process of FIG. 3,the contents 70 targeted for the personal computer can be displayed onthe screen of the portable device 10 without losing the significancethat the two-dimensional array of the contents 70 has.

FIG. 14 is a comparative example of a screen image for comparing withthe screen image shown in FIG. 13. In this example of FIG. 14, cells ofthe contents 70 of FIG. 11 are subjected to a process in which all ofthe cells are aligned vertically on the screen of the portable device 10without exception. As can be seen from FIG. 14, in this comparativeexample, the significance of a two-dimensional array of the table islost.

Although, in the first embodiment, the present invention has beendescribed in considerable detail, variables of the first embodiment arepossible.

For example, in the determining step S11 of the table-layout processshown in FIG. 3, the target table is subjected to the series ofprocesses of S13-S21 only when the minimum table width is determined tohave a size larger than the screen width (200 pixels) of the portabledevice 10. However, when at least one of the following criterions C1, C2and C3 is satisfied, the target table may be subjected to the series ofprocesses of S13-S21 even if the minimum table width is determined tohave a size less than or equal to the screen width of the portabledevice 10.

-   C1. The number of carriage returns of characters in a cell becomes    greater than a predetermined value when the table is subjected to    the step S12 using the typical technique or when cells of a row of    the table are minimized.-   C2. The length of a cell in a vertical direction becomes greater    than a predetermined value (or a ratio of the vertical size to the    horizontal size of a cell becomes grater than a predetermined ratio)    when the table is subjected to the step S12 using the typical    technique or when cells of a row of the table are minimized.-   C3. The width of a cell including characters becomes less than or    equal to a certain value when the table is subjected to the step S12    or when cells of a row of the table are minimized.

If the criterion C1 or C2 is satisfied, the table may become hard toread for the user because the length of a cell in the vertical directionbecomes too long. For this reason, the criterions C1 and C2 are adoptedso that the table is subjected to the splitting process S21 when thecriterion C1 or C2 is satisfied.

If the criterion C3 is satisfied, the width of the cell includingcharacters may become too small to read the characters in the cell. Forthis reason, the criterion C3 is adopted so that the table is subjectedto the splitting process S21 when the criterion C3 is satisfied.

Second Embodiment

A second embodiment of the invention will be described. In contrast tothe first embodiment in which a table is subjected to the table-layoutprocess, in the second embodiment a frameset is subjected to thetable-layout process of FIG. 3.

Since a block diagram of a portable device, a functional block diagramof a browser, and a table-layout process according to the secondembodiment are substantially the same as those of the first embodiment,the second embodiment is described with reference to FIGS. 1, 2 and 3,and explanations of FIGS. 1-3 will not be repeated.

More specifically, if contents targeted for the personal computercontain a frameset bracketed by tags <frameset> and </frameset>, theframeset is converted to a table, and thereafter the table is subjectedto the table-layout process of FIG. 3. That is, according to the secondembodiment, the frameset is displayed on the screen of the portabledevice 10 without losing the significance that a linear array or atwo-dimensional array of the frameset has.

Hereafter, a conversion algorithm for converting a frameset to a tablewill be described.

In order to convert the frameset to the table (i.e., in order to convertparameters for the frameset to parameters for the table), the followingrules are used.

-   R1. <FRAMESET>→[</TD>][</TR><TR>][<TD>]<TABLE><TBODY><TR>-   R2. </FRAMESET>→</TR></TBODY></TABLE>-   R3. <FRAME src=“url”    name=“name_str”>→[</TD>][</TR><TR>]<TD><Ahref=“url”>name_str</A></TD>    In the above rules R1-R3, the following supplemental rules are    adopted.    -   [<TD>] and [</TD>] are used when the frameset is nested.    -   [</TR><TR>] is used on an as needed basis to demarcate columns        based on information of a “frameset cols” attribute.    -   If a name attribute does not exist, “url” is used in place of        “name_str”.    -   Attributes <TABLE width=100% border=1 frames=void rules=all        cellspacing=0><TD style=“background-color: #ccf0ff;        border-width: 1; border-color: white;”> are used as modifiers.

Here, an example in which a frameset is converted to a table will bedescribed.

(Frameset before the conversion) <FRAMESET cols = “1*, 2*, 3*”> <FRAMEsrc = “1.htm” name = left> <FRAMESET rows = “1*, 2*, 3*”> <FRAME src =“2-1.htm”> <FRAME src = “2-2.htm”> <FRAME src = “2-3.htm”> </FRAMESET><FRAME src = “3.htm” name = right> </FRAMESET>

(Table after the conversion) <TABLE><TBODY><TR> <TD><A href =“1.htm”>left</A></TD> <TD><TABLE><TBODY><TR> <TD><A href =“2-1.htm”>2-1.htm</A></TD> </TR><TR><TD><A href =“2-2.htm”>2-2.htm</A></TD> </TR><TR><TD><A href =“2-3.htm”>2-3.htm</A></TD> <TR></TBODY></TABLE> </TD><TD><A href =“3.htm”>right</A></TD> </TR></TBODY></TABLE>In the “table after the conversion”, attributes for modification areomitted for the sake of simplicity.

By treating the table converted by the above conversion algorithm in thetable-layout process of FIG. 3, the frameset can be targeted for thesplitting process S21. Therefore, according to the second embodiment,even if the contents targeted for the personal computer include theframeset, the contents can be displayed on the portable device 10without losing the significance that the linear array or thetwo-dimensional array of the frameset has.

FIG. 15 is an example of a screen image in a case where contentstargeted for the personal computer are displayed on a screen of thepersonal computer by the conventional browser. In the example of FIG.15, the frameset includes a frame 101 of “topmain”, a frame 102 of“menu”, a frame 103 of “main”, a frame 104 of “weather”, and a frame 105of “banner”.

FIG. 16 shows a screen image in a case where the frameset shown in FIG.15 is converted to the table in accordance with the above conversionalgorithm and is laid out by the table-layout process on the screen ofthe portable device 10. Frame portions of 201, 202, 203, 204 and 205 ofFIG. 16 respectively correspond to the frames of 101, 102, 103, 104 and105 of FIG. 15. When the user clicks one of anchors of “topmain”,“menu”, “main”, “weather” and “banner” on the screen image of FIG. 16,detailed information thereof is obtained and displayed.

Since the frameset is displayed on the screen of the portable device 10as indicated in FIG. 16, a frame switching can be made relatively easilyby operating, for example, the up-and-down key of the portable device10. There is no necessity to provide a special key such as a frameswitching key with the portable device 10. It is understood from theFIG. 16 that the user can select one of anchors of “topmain”, “menu”,“main”, “weather” and “banner” by simply operating the up-and-down key.

It should be noted that, in the example of the screen image of FIG. 16,the significance that the two-dimensional array of the original framesethas is not lost.

Although the present invention has been described in considerable detailwith reference to certain preferred embodiments thereof, otherembodiments are possible.

For example, the above mentioned algorithms or rules for suitablydisplaying the table or frameset targeted for the personal computer onthe screen of the portable device without losing the significance thatthe linear array or the two-dimensional array of the table or framesethas can be applied to various data in contents having a linear or atwo-dimensional array.

Although, in the above mentioned embodiments, the table-layout processis implemented on the mobile phone to display the contents targeted forthe personal computer on the screen of the mobile phone, thetable-layout process can be implemented on a terminal device havingsmaller screen size to display contents targeted for a device having alarger screen size on the screen of the terminal device having thesmaller screen size. For example, the table-layout process of theembodiment may be implemented on a mobile phone to display contentstargeted for an Internet TV (television) or a TV for data broadcastinghaving a wide and high-resolution screen on a screen of the mobilephone.

The device and method according to the present invention can be realizedwhen appropriate programs are provided and executed by a computer. Suchprograms may be stored in recording medium such as a flexible disk,CD-ROM, memory cards and the like and distributed. Alternatively oroptionally, such programs can be distributed through networks such asthe Internet.

1. A method of laying out contents targeted for a first device having afirst screen size on a screen of a second device having a second screensize smaller than the first screen size, comprising: analyzing a tabledefined by a tag <table> in the contents to determine a table width ofthe table in accordance with a predetermined criterion; and performingin response to a result of said analyzing step one of layout operationsof: (p1) laying out the table using a typical technique in accordancewith the second screen size, and (p2) laying out a row of cells in thetable so that at least two cells arranged adjacently in a horizontaldirection in the row of the table are aligned horizontally on the screenof the second device based on a predetermined algorithm, wherein thepredetermined criterion includes a first criterion that whether or not acondition: (a minimum table width)>(a width of the screen of the seconddevice) is satisfied, the minimum table width of the table being a widthof a row in the table when cells of the row of the table is minimized,wherein the predetermined criterion further includes a second criterionthat a number of carriage returns of characters in at least one of cellsof a row of the table is greater than a certain value when the cells ofthe row of the table are minimized, wherein when the first criterion isnot satisfied, the operation of (p1) is performed, wherein when thefirst criterion is satisfied, the operation (p2) is performed, andwherein when the second criterion is satisfied, the operation (p2) isperformed even if the first criterion is not satisfied.
 2. The methodaccording to claim 1, wherein the layout operations further includes:(p3) scaling down the table configured to be a combinational imagehaving a plurality of partial images so that the combinational image canbe contained in the screen of the second device at least in a horizontaldirection.
 3. The method according to claim 2, wherein when the firstcriterion is satisfied, one of the operations of (p2) and (p3) isperformed.
 4. The method according to claim 3, wherein when the secondcriterion is satisfied, one of the operations of (p2) and (p3) isperformed even if the first criterion is not satisfied.
 5. The methodaccording to claim 2, wherein the operation (p3) includes: (b1) scalingdown cells of the table by the same scaling factor in accordance withthe second screen size, and (b2) scaling down each of partial images ofthe cells of the table in accordance with a width of a correspondingscaled down cell.
 6. The method according to claim 1, wherein thepredetermined algorithm includes operations of: (a1) aligning the atleast two cells arranged adjacently in the horizontal direction in therow of the table on a row of the screen of the second device, (a2)aligning remaining cells of the at least two sells, that can not bealigned on the row of the screen of the second device, on another row ofthe screen of the second device, and (a3) performing the operations of(a1) and (a2) with respect to all rows of the table.
 7. The methodaccording to claim 1, further comprising: converting in advance aframeset to a table in accordance with a predetermined conversionalgorithm if the frameset exists in the contents.
 8. The methodaccording to claim 1, further comprising: obtaining in advance thecontents through a network.
 9. The method according to claim 1, furthercomprising: obtaining in advance the contents through the Internet. 10.The method according to claim 1, wherein the contents includes adocument described by a markup language.
 11. A method of laying outcontents targeted for a first device having a first screen size on ascreen of a second device having a second screen size smaller than thefirst screen size, comprising: analyzing a table defined by a tag<table> in the contents to determine a table width of the table inaccordance with a predetermined criterion; and performing in response toa result of said analyzing step one of layout operations of: (p1) layingout the table using a typical technique in accordance with the secondscreen size, and (p2) laying out a row of cells in the table so that atleast two cells arranged adjacently in a horizontal direction in the rowof the table are aligned horizontally on the screen of the second devicebased on a predetermined algorithm, wherein the predetermined criterionincludes a first criterion that whether or not a condition: (a minimumtable width)>(a width of the screen of the second device) is satisfied,the minimum table width of the table being a width of a row in the tablewhen cells of the row of the table is minimized, wherein thepredetermined criterion further includes a third criterion that a ratioof a vertical size to a horizontal size of at least one of cells of arow of the table is greater than a certain ratio when the cells of therow of the table are minimized, wherein when the first criterion is notsatisfied, the operation of (p1) is performed, wherein when the firstcriterion is satisfied, the operation (p2) is performed, wherein whenthe third criterion is satisfied, the process (p2) is performed even ifthe first criterion is not satisfied.
 12. The method according to claim11, wherein the layout operations further includes: (p3) scaling downthe table configured to be a combinational image having a plurality ofpartial images so that the combinational image can be contained in thescreen of the second device at least in a horizontal direction.
 13. Themethod according to claim 12, wherein when the first criterion issatisfied, one of the operations of (p2) and (p3) is performed.
 14. Themethod according to claim 13, wherein when the third criterion issatisfied, one of the processes of (p2) and (p3) is performed even ifthe first criterion is not satisfied.
 15. A method of laying outcontents targeted for a first device having a first screen size on ascreen of a second device having a second screen size smaller than thefirst screen size, comprising: analyzing a table defined by a tag<table> in the contents to determine a table width of the table inaccordance with a predetermined criterion; and performing in response toa result of said analyzing step one of layout operations of: (p1) layingout the table using a typical technique in accordance with the secondscreen size, and (p2) laying out a row of cells in the table so that atleast two cells arranged adjacently in a horizontal direction in the rowof the table are aligned horizontally on the screen of the second devicebased on a predetermined algorithm, wherein the predetermined criterionincludes a first criterion that whether or not a condition: (a minimumtable width)>(a width of the screen of the second device) is satisfied,the minimum table width of the table being a width of a row in the tablewhen cells of the row of the table is minimized, wherein thepredetermined criterion further includes a fourth criterion that a widthof at least one of cells having characters in a row of the table is lessthan or equal to a certain value when the cells of the row of the tableare minimized, wherein when the first criterion is not satisfied, theoperation of (p1) is performed, wherein when the first criterion issatisfied, the operation (p2) is performed, wherein when the forthcriterion is satisfied, the operation (p2) is performed even if thefirst criterion is not satisfied.
 16. The method according to claim 15,wherein the layout operations further includes: (p3) scaling down thetable configured to be a combinational image having a plurality ofpartial images so that the combinational image can be contained in thescreen of the second device at least in a horizontal direction.
 17. Themethod according to claim 16, wherein when the first criterion issatisfied, one of the operations of (p2) and (p3) is performed.
 18. Themethod according to claim 17, wherein when the forth criterion issatisfied, one of the operations of (p2) and (p3) is performed even ifthe first criterion is not satisfied.
 19. A method of laying outcontents targeted for a first device having a first screen size on ascreen of a second device having a second screen size smaller than thefirst screen size, comprising: analyzing a table defined by a tag<table> in the contents to determine a table width of the table inaccordance with a predetermined criterion; performing in response to aresult of said analyzing step one of layout operations of: (p1) layingout the table using a typical technique in accordance with the secondscreen size, (p2) laying out a row of cells in the table so that atleast two cells arranged adjacently in a horizontal direction in the rowof the table are aligned horizontally on the screen of the second devicebased on a predetermined algorithm, and (p3) scaling down the tableconfigured to be a combinational image having a plurality of partialimages so that the combinational image can be contained in the screen ofthe second device at least in a horizontal direction; and determiningwhether the table is configured to be the combinational image, whereinthe operation (p3) is performed when the table is determined to be thecombinational image by said determining step, wherein, in saiddetermining step, when a ratio of a number of cells having images to anumber of all cells of the table is greater than a certain ratio, thetable is determined to be the combinational image.
 20. A method oflaying out contents targeted for a first device having a first screensize on a screen of a second device having a second screen size smallerthan the first screen size, comprising: analyzing a table defined by atag <table> in the contents to determine a table width of the table inaccordance with a predetermined criterion; and performing in response toa result of said analyzing step one of layout operations of: (p1) layingout the table using a typical technique in accordance with the secondscreen size, and (p2) laying out a row of cells in the table so that atleast two cells arranged adjacently in a horizontal direction in the rowof the table are aligned horizontally on the screen of the second devicebased on a predetermined algorithm, wherein the predetermined criterionincludes a first criterion that whether or not a condition: (a minimumtable width)>(a width of the screen of the second device) is satisfied,the minimum table width of the table being a width of a row in the tablewhen cells of the row of the table is minimized, wherein when the firstcriterion is not satisfied, the operation of (p1) is performed, whereinwhen the first criterion is satisfied, the operation (p2) is performed,wherein the minimum table width is a sum of widths of images in cells ofthe row of the table, a maximum of widths of characters in each cell ofthe row of the table, and widths of borders between adjacent cells ofthe row of the table.
 21. The method according to claim 20, wherein thelayout operations further includes: (p3) scaling down the tableconfigured to be a combinational image having a plurality of partialimages so that the combinational image can be contained in the screen ofthe second device at least in a horizontal direction.
 22. The methodaccording to claim 20, wherein when the first criterion is satisfied,one of the operations of (p2) and (p3) is performed.
 23. A computerprogram product comprising a set of instructions stored on a recordingmedium to be executed by a terminal device, the terminal deviceexecuting the instructions functioning as laying out contents targetedfor a device having a first screen size on a screen of the terminaldevice having a second screen size smaller than the first screen size,the computer program product comprising functions of: obtaining thecontents through a network; analyzing a table defined by a tag <table>in the contents to determined a table width of the table in accordancewith a predetermined criterion; and performing, in response to a resultof said analyzing, one of layout operations of: (p1) laying out thetable using a typical technique in accordance with the second screensize, and (p2) laying out a row of cells in the table so that at leasttwo cells arranged adjacently in a horizontal direction in the row ofthe table are aligned horizontally on the screen of the terminal devicebased on a predetermined algorithm, wherein the predetermined criterionincludes a first criterion that whether or not a condition: (a minimumtable width)>(a width of the screen of the terminal device) issatisfied, the minimum table width of the table being a width of a rowin the table when cells of the row of the table is minimized, whereinthe predetermined criterion further includes a second criterion that anumber of carriage returns of characters in at least one of cells of arow of the table is greater than a certain value when the cells of therow of the table are minimized, wherein when the first criterion is notsatisfied, the operation of (p1) is performed, wherein when the firstcriterion is satisfied, the operation (p2) is performed, wherein whenthe second criterion is satisfied, the operation (p2) is performed evenif the first criterion is not satisfied.
 24. A terminal device forlaying out contents targeted for a device having a first screen size ona screen of said terminal device having a second screen size smallerthan the first screen size, comprising: an analyzing system embodied ona recording medium of the terminal device that analyzes a table definedby a tag <table> in the contents to determined a table width of thetable in accordance with a predetermined criterion; and a layout systemembodied on the recording medium of the terminal device that performs inresponse to a result of an analysis of said analyzing system one oflayout operations of: (p1) laying out the table using a typicaltechnique in accordance with the second screen size, (p2) laying out arow of cells in the table so that at least two cells arranged adjacentlyin a horizontal direction in the row of the table are alignedhorizontally on the screen of said terminal device based on apredetermined algorithm, and (p3) scaling down the table configured tobe a combinational image having a plurality of partial images so thatthe combinational image can be contained in the screen of said terminaldevice at least in a horizontal direction, wherein the predeterminedcriterion includes a first criterion that whether or not a condition: (aminimum table width)>(a width of the screen of the terminal device) issatisfied, the minimum table width of the table being a width of a rowin the table when cells of the row of the table is minimized, whereinthe predetermined criterion further includes a second criterion that anumber of carriage returns of characters in at least one of cells of arow of the table is greater than a certain value when the cells of therow of the table are minimized, wherein when the first criterion is notsatisfied, the operation of (p1) is performed, wherein when the firstcriterion is satisfied, the operation (p2) is performed, wherein whenthe second criterion is satisfied, the operation (p2) is performed evenif the first criterion is not satisfied.
 25. The terminal deviceaccording to claim 24, further comprising an obtaining system embodiedon the recording medium of the terminal device that obtains the contentsthrough a network.
 26. A computer program product comprising a set ofinstructions stored on a recording medium to be executed by a terminaldevice, the terminal device executing the instructions functioning aslaying out contents targeted for a device having a first screen size ona screen of the terminal device having a second screen size smaller thanthe first screen size, the computer program product comprising functionsof: obtaining the contents through a network; analyzing a table definedby a tag <table> in the contents to determined a table width of thetable in accordance with a predetermined criterion; and performing, inresponse to a result of said analyzing, one of layout operations of:(p1) laying out the table using a typical technique in accordance withthe second screen size, and (p2) laying out a row of cells in the tableso that at least two cells arranged adjacently in a horizontal directionin the row of the table are aligned horizontally on the screen of theterminal device based on a predetermined algorithm, wherein thepredetermined criterion includes a first criterion that whether or not acondition: (a minimum table width)>(a width of the screen of theterminal device) is satisfied, the minimum table width of the tablebeing a width of a row in the table when cells of the row of the tableis minimized, wherein the predetermined criterion further includes athird criterion that a ratio of a vertical size to a horizontal size ofat least one of cells of a row of the table is grater than a certainratio when the cells of the row of the table are minimized, wherein whenthe first criterion is not satisfied, the operation of (p1) isperformed, wherein when the first criterion is satisfied, the operation(p2) is performed, wherein when the third criterion is satisfied, theprocess (p2) is performed even if the first criterion is not satisfied.27. A computer program product comprising a set of instructions storedon a recording medium to be executed by a terminal device, the terminaldevice executing the instructions functioning as laying out contentstargeted for a device having a first screen size on a screen of theterminal device having a second screen size smaller than the firstscreen size, the computer program product comprising functions of:obtaining the contents through a network; analyzing a table defined by atag <table> in the contents to determined a table width of the table inaccordance with a predetermined criterion; and performing, in responseto a result of said analyzing, one of layout operations of: (p1) layingout the table using a typical technique in accordance with the secondscreen size, and (p2) laying out a row of cells in the table so that atleast two cells arranged adjacently in a horizontal direction in the rowof the table are aligned horizontally on the screen of the terminaldevice based on a predetermined algorithm, wherein the predeterminedcriterion includes a first criterion that whether or not a condition: (aminimum table width)>(a width of the screen of the terminal device) issatisfied, the minimum table width of the table being a width of a rowin the table when cells of the row of the table is minimized, whereinthe predetermined criterion further includes a fourth criterion that awidth of at least one of cells having characters in a row of the tableis less than or equal to a certain value when the cells of the row ofthe table are minimized, wherein when the first criterion is notsatisfied, the operation of (p1) is performed, wherein when the firstcriterion is satisfied, the operation (p2) is performed, wherein whenthe forth criterion is satisfied, the operation (p2) is performed evenif the first criterion is not satisfied.
 28. A computer program productcomprising a set of instructions stored on a recording medium to beexecuted by a terminal device, the terminal device executing theinstructions functioning as laying out contents targeted for a devicehaving a first screen size on a screen of the terminal device having asecond screen size smaller than the first screen size, the computerprogram product comprising functions of: obtaining the contents througha network; analyzing a table defined by a tag <table> in the contents todetermined a table width of the table in accordance with a predeterminedcriterion; and performing, in response to a result of said analyzing,one of layout operations of: (p1) laying out the table using a typicaltechnique in accordance with the second screen size, and (p2) laying outa row of cells in the table so that at least two cells arrangedadjacently in a horizontal direction in the row of the table are alignedhorizontally on the screen of the terminal device based on apredetermined algorithm, wherein the predetermined criterion includes afirst criterion that whether or not a condition: (a minimum tablewidth)>(a width of the screen of the terminal device) is satisfied, theminimum table width of the table being a width of a row in the tablewhen cells of the row of the table is minimized, wherein when the firstcriterion is not satisfied, the operation of (p1) is performed, whereinwhen the first criterion is satisfied, the operation (p2) is performed,wherein the minimum table width is a sum of widths of images in cells ofthe row of the table, a maximum of widths of characters in each cell ofthe row of the table, and widths of borders between adjacent cells ofthe row of the table.
 29. A computer program product comprising a set ofinstructions stored on a recording medium to be executed by a terminaldevice, the terminal device executing the instructions functioning aslaying out contents targeted for a device having a first screen size ona screen of the terminal device having a second screen size smaller thanthe first screen size, the computer program product comprising functionsof: obtaining the contents through a network; analyzing a table definedby a tag <table> in the contents to determined a table width of thetable in accordance with a predetermined criterion; and performing, inresponse to a result of said analyzing, one of layout operations of:(p1) laying out the table using a typical technique in accordance withthe second screen size, (p2) laying out a row of cells in the table sothat at least two cells arranged adjacently in a horizontal direction inthe row of the table are aligned horizontally on the screen of theterminal device based on a predetermined algorithm, and (p3) scalingdown the table configured to be a combinational image having a pluralityof partial images so that the combinational image can be contained inthe screen of the terminal device at least in a horizontal direction;and determining whether the table is configured to be the combinationalimage, wherein the operation (p3) is performed when the table isdetermined to be the combinational image by said determining step,wherein, in said determining step, when a ratio of a number of cellshaving images to a number of all cells of the table is greater than acertain ratio, the table is determined to be the combinational image.30. A terminal device for laying out contents targeted for a devicehaving a first screen size on a screen of said terminal device having asecond screen size smaller than the first screen size, comprising: ananalyzing system embodied on a recording medium of the terminal devicethat analyzes a table defined by a tag <table> in the contents todetermined a table width of the table in accordance with a predeterminedcriterion; and a layout system embodied on the recording medium of theterminal device that performs in response to a result of an analysis ofsaid analyzing system one of layout operations of: (p1) laying out thetable using a typical technique in accordance with the second screensize, (p2) laying out a row of cells in the table so that at least twocells arranged adjacently in a horizontal direction in the row of thetable are aligned horizontally on the screen of said terminal devicebased on a predetermined algorithm, wherein the predetermined criterionincludes a first criterion that whether or not a condition: (a minimumtable width)>(a width of the screen of the terminal device) issatisfied, the minimum table width of the table being a width of a rowin the table when cells of the row of the table is minimized, whereinthe predetermined criterion further includes a third criterion that aratio of a vertical size to a horizontal size of at least one of cellsof a row of the table is grater than a certain ratio when the cells ofthe row of the table are minimized, wherein when the first criterion isnot satisfied, the operation of (p1) is performed, wherein when thefirst criterion is satisfied, the operation (p2) is performed, whereinwhen the third criterion is satisfied, the process (p2) is performedeven if the first criterion is not satisfied.
 31. A terminal device forlaying out contents targeted for a device having a first screen size ona screen of said terminal device having a second screen size smallerthan the first screen size, comprising: an analyzing system embodied ona recording medium of the terminal device that analyzes a table definedby a tag <table> in the contents to determined a table width of thetable in accordance with a predetermined criterion; and a layout systemembodied on the recording medium of the terminal device that performs inresponse to a result of an analysis of said analyzing system one oflayout operations of: (p1) laying out the table using a typicaltechnique in accordance with the second screen size, (p2) laying out arow of cells in the table so that at least two cells arranged adjacentlyin a horizontal direction in the row of the table are alignedhorizontally on the screen of said terminal device based on apredetermined algorithm, wherein the predetermined criterion includes afirst criterion that whether or not a condition: (a minimum tablewidth)>(a width of the screen of the terminal device) is satisfied, theminimum table width of the table being a width of a row in the tablewhen cells of the row of the table is minimized, wherein thepredetermined criterion further includes a fourth criterion that a widthof at least one of cells having characters in a row of the table is lessthan or equal to a certain value when the cells of the row of the tableare minimized, wherein when the first criterion is not satisfied, theoperation of (p1) is performed, wherein when the first criterion issatisfied, the operation (p2) is performed, wherein when the forthcriterion is satisfied, the operation (p2) is performed even if thefirst criterion is not satisfied.
 32. A terminal device for laying outcontents targeted for a device having a first screen size on a screen ofsaid terminal device having a second screen size smaller than the firstscreen size, comprising: an analyzing system embodied on a recordingmedium of the terminal device that analyzes a table defined by a tag<table> in the contents to determined a table width of the table inaccordance with a predetermined criterion; and a layout system embodiedon the recording medium of the terminal device that performs in responseto a result of an analysis of said analyzing system one of layoutoperations of: (p1) laying out the table using a typical technique inaccordance with the second screen size, (p2) laying out a row of cellsin the table so that at least two cells arranged adjacently in ahorizontal direction in the row of the table are aligned horizontally onthe screen of said terminal device based on a predetermined algorithm,wherein the predetermined criterion includes a first criterion thatwhether or not a condition: (a minimum table width)>(a width of thescreen of the terminal device) is satisfied, the minimum table width ofthe table being a width of a row in the table when cells of the row ofthe table is minimized, wherein when the first criterion is notsatisfied, the operation of (p1) is performed, wherein when the firstcriterion is satisfied, the operation (p2) is performed, wherein theminimum table width is a sum of widths of images in cells of the row ofthe table, a maximum of widths of characters in each cell of the row ofthe table, and widths of borders between adjacent cells of the row ofthe table.
 33. A terminal device for laying out contents targeted for adevice having a first screen size on a screen of said terminal devicehaving a second screen size smaller than the first screen size,comprising: an analyzing system embodied on a recording medium of theterminal device that analyzes a table defined by a tag <table> in thecontents to determined a table width of the table in accordance with apredetermined criterion; and a layout system embodied on the recordingmedium of the terminal device that performs in response to a result ofan analysis of said analyzing system one of layout operations of: (p1)laying out the table using a typical technique in accordance with thesecond screen size, (p2) laying out a row of cells in the table so thatat least two cells arranged adjacently in a horizontal direction in therow of the table are aligned horizontally on the screen of said terminaldevice based on a predetermined algorithm, and (p3) scaling down thetable configured to be a combinational image having a plurality ofpartial images so that the combinational image can be contained in thescreen of the terminal device at least in a horizontal direction; anddetermining whether the table is configured to be the combinationalimage, wherein the operation (p3) is performed when the table isdetermined to be the combinational image by said determining step,wherein, in said determining step, when a ratio of a number of cellshaving images to a number of all cells of the table is greater than acertain ratio, the table is determined to be the combinational image.